﻿namespace Wedn.Model.Data
{
    /// <summary>
    /// 文章实体模型类(初步审核通过)
    /// </summary>
    public class Post
    {
        #region 所有字段
        private int id;
        private string alias;
        private string title;
        private string subTitle;
        private string pubDate;
        private string update;
        private string content;
        private int commentCount;
        private int viewCount;
        private int autherId;
        private int status;
        private int viewLevel;
        private string password;
        #endregion

        #region 对外公共属性
        /// <summary>
        /// 主键(自增长)字段
        /// </summary>
        public int Id
        {
            get { return id; }
            set { id = value; }
        }
        /// <summary>
        /// 文章别名(伪静态用)字段
        /// </summary>
        public string Alias
        {
            get { return alias; }
            set { alias = value; }
        }
        /// <summary>
        /// 文章标题字段
        /// </summary>
        public string Title
        {
            get { return title; }
            set { title = value; }
        }
        /// <summary>
        /// 文章副标题字段
        /// </summary>
        public string SubTitle
        {
            get { return subTitle; }
            set { subTitle = value; }
        }
        /// <summary>
        /// 文章发布日期字段
        /// </summary>
        public string PubDate
        {
            get { return pubDate; }
            set { pubDate = value; }
        }
        /// <summary>
        /// 文章最后编辑时间字段
        /// </summary>
        public string Update
        {
            get { return update; }
            set { update = value; }
        }
        /// <summary>
        /// 文章正文字段
        /// </summary>
        public string Content
        {
            get { return content; }
            set { content = value; }
        }
        /// <summary>
        /// 文章评论次数字段
        /// </summary>
        public int CommentCount
        {
            get { return commentCount; }
            set { commentCount = value; }
        }
        /// <summary>
        /// 文章浏览次数字段
        /// </summary>
        public int ViewCount
        {
            get { return viewCount; }
            set { viewCount = value; }
        }
        /// <summary>
        /// 文章作者ID字段
        /// </summary>
        public int AutherId
        {
            get { return autherId; }
            set { autherId = value; }
        }
        /// <summary>
        /// 文章状态字段(0:发布, 1:草稿, 2:回收站)
        /// </summary>
        public int Status
        {
            get { return status; }
            set { status = value; }
        }
        /// <summary>
        /// 文章浏览等级字段(0:公开, 1:加密, 2:私密)
        /// </summary>
        public int ViewLevel
        {
            get { return viewLevel; }
            set { viewLevel = value; }
        }
        /// <summary>
        /// 文章密码字段
        /// </summary>
        public string Password
        {
            get { return password; }
            set { password = value; }
        }
        #endregion

        #region 构造函数
        public Post() { }
        /// <summary>
        /// 文章实体模型类构造函数
        /// </summary>
        /// <param name="id">文章编号</param>
        /// <param name="alias">文章别名</param>
        /// <param name="titile">文章标题</param>
        /// <param name="subTitle">文章副标题</param>
        /// <param name="pubDate">文章发布日期</param>
        /// <param name="update">文章最后编辑时间</param>
        /// <param name="content">文章正文</param>
        /// <param name="commenCount">文章评论次数</param>
        /// <param name="viewCount">文章浏览次数</param>
        /// <param name="autherId">文章作者ID</param>
        /// <param name="status">文章当前状态(0:发布, 1:草稿, 2:回收站)</param>
        /// <param name="viewLevel">文章浏览权限(0:公开, 1:加密, 2:私密)</param>
        /// <param name="password">文章密码</param>
        public Post(int id, string alias, string titile, string subTitle, string pubDate, string update, string content, int commenCount, int viewCount, int autherId, int status, int viewLevel, string password)
        {
            this.id = id;
            this.alias = alias;
            this.title = titile;
            this.subTitle = subTitle;
            this.pubDate = pubDate;
            this.update = update;
            this.content = content;
            this.commentCount = commenCount;
            this.viewCount = viewCount;
            this.autherId = autherId;
            this.status = status;
            this.viewLevel = viewLevel;
            this.password = password;
        } 
        #endregion
    }
}
